package com.kexio.enterprise.integration.notification.preferences;

import com.kexio.enterprise.integration.notification.enums.NotificationChannel;
import com.kexio.enterprise.integration.notification.enums.NotificationType;

import java.util.List;
import java.util.Map;

/**
 * 通知偏好设置
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class NotificationPreferences {
    private Long userId;
    private Map<NotificationType, List<NotificationChannel>> channelPreferences;
    private Map<NotificationType, Boolean> typeEnabled;
    private String timezone;
    private Integer quietHourStart; // 免打扰开始时间（小时）
    private Integer quietHourEnd;   // 免打扰结束时间（小时）
    private Boolean enableQuietMode;
    private List<String> blockedSenders;
    private List<String> allowedKeywords;
    private List<String> blockedKeywords;

    public NotificationPreferences() {
        this.enableQuietMode = false;
        this.quietHourStart = 22; // 默认晚上10点开始免打扰
        this.quietHourEnd = 8;    // 默认早上8点结束免打扰
    }

    // Getters and Setters
    public Long getUserId() { return userId; }
    public void setUserId(Long userId) { this.userId = userId; }
    
    public Map<NotificationType, List<NotificationChannel>> getChannelPreferences() { return channelPreferences; }
    public void setChannelPreferences(Map<NotificationType, List<NotificationChannel>> channelPreferences) { this.channelPreferences = channelPreferences; }
    
    public Map<NotificationType, Boolean> getTypeEnabled() { return typeEnabled; }
    public void setTypeEnabled(Map<NotificationType, Boolean> typeEnabled) { this.typeEnabled = typeEnabled; }
    
    public String getTimezone() { return timezone; }
    public void setTimezone(String timezone) { this.timezone = timezone; }
    
    public Integer getQuietHourStart() { return quietHourStart; }
    public void setQuietHourStart(Integer quietHourStart) { this.quietHourStart = quietHourStart; }
    
    public Integer getQuietHourEnd() { return quietHourEnd; }
    public void setQuietHourEnd(Integer quietHourEnd) { this.quietHourEnd = quietHourEnd; }
    
    public Boolean getEnableQuietMode() { return enableQuietMode; }
    public void setEnableQuietMode(Boolean enableQuietMode) { this.enableQuietMode = enableQuietMode; }
    
    public List<String> getBlockedSenders() { return blockedSenders; }
    public void setBlockedSenders(List<String> blockedSenders) { this.blockedSenders = blockedSenders; }
    
    public List<String> getAllowedKeywords() { return allowedKeywords; }
    public void setAllowedKeywords(List<String> allowedKeywords) { this.allowedKeywords = allowedKeywords; }
    
    public List<String> getBlockedKeywords() { return blockedKeywords; }
    public void setBlockedKeywords(List<String> blockedKeywords) { this.blockedKeywords = blockedKeywords; }
}
